<?php


namespace addon\hotel\model;

use app\model\BaseModel;
use app\model\system\Document;
use Exception;

class Config extends BaseModel
{

    /**
     * 入驻协议
     * @param unknown $site_id
     * @param unknown $name
     * @param unknown $value
     */
    public function setSettledInDocument($title, $content)
    {
        $document = new Document();
        $res = $document->setDocument($title, $content, [ [ 'site_id', '=', 0 ], [ 'app_module', '=', 'admin' ], [ 'document_key', '=', 'HOTEL_SETTLED_IN_AGREEMENT' ] ]);
        return $res;
    }

    /**
     * 查询入驻协议
     * @param unknown $where
     * @param unknown $field
     * @param unknown $value
     */
    public function getSettledInDocument()
    {
        $document = new Document();
        $info = $document->getDocument([ [ 'site_id', '=', 0 ], [ 'app_module', '=', 'admin' ], [ 'document_key', '=', 'HOTEL_SETTLED_IN_AGREEMENT' ] ]);
        return $info;
    }

}